<style>
    	.search_form .layui-inline {
    		padding-left: 0px;
    	}

    	.layui-form-label {
    		line-height: 25px;
    	}
    	.search_form .layui-form-label {
    		padding: 5px 5px 0 5px;
    	}
    </style>

    <div class="search-box" style="z-index: 1000;">
    	<form class="search_form layui-form" lay-filter="tuisong_search_form">
			<div class="layui-inline">
    			<label class="layui-form-label layui-bg-blue">军采单号</label>
    			<div class="layui-input-inline">
    				<input type="text" name="out_order_no" autocomplete="off" class="layui-input"
    					onkeyup="this.value=this.value.replace(/[, ]/g,'')">
    			</div>
    		</div>
    		<div class="layui-inline">
                <label class="layui-form-label layui-bg-blue">订单类型</label>
                <div class="layui-input-inline">
                    <select name="order_type" lay-filter="order_type" id="order_type">
                        <option value="">全部</option>
                        <option value="1">自然订单</option>
                        <option value="2">报备订单</option>
                        <option value="3">其他</option>
                        <option value="4">改供货商</option>
                        <option value="5">退货</option>
                        <option value="6">竞价订单</option>
                        <option value="7">废止订单</option>
                        <option value="8">前报备</option>
                        <option value="9">后报备</option>
                        <option value="10">带量竞价</option>
                    </select>
                </div>
            </div>
			<div class="layui-inline">
			    <label class="layui-form-label layui-bg-blue">发票类型</label>
			    <div class="layui-input-inline">
			        <select name="api_type" lay-filter="api_type" id="api_type">
			            <option value="">全部</option>
			            <option value="026">026</option>
			            <option value="82">82</option>
			        </select>
			    </div>
			</div>
    		<div class="layui-inline" style="display: none;">
    			<label class="layui-form-label layui-bg-blue">金额</label>
    			<div class="layui-input-inline">
    				<input type="text" name="min_order_money" autocomplete="off" class="layui-input" placeholder="最低金额">
    			</div>
    			<div class="layui-input-inline">
    				<input type="text" name="max_order_money" autocomplete="off" class="layui-input" placeholder="最高金额">
    			</div>
    		</div>
    		<div class="layui-inline">
    			<label class="layui-form-label layui-bg-blue">供应商</label>
    			<div class="layui-input-inline">
    				<input type="text" name="susername" autocomplete="off" class="layui-input">
    			</div>
    		</div>
         <!--   <div class="layui-inline">
                <label class="layui-form-label layui-bg-blue">会员id</label>
                <div class="layui-input-inline">
                    <input type="text" name="reason" autocomplete="off" class="layui-input">
                </div>
            </div>
        -->
    		<div class="layui-inline">
    			<label class="layui-form-label layui-bg-blue">抬头</label>
    			<div class="layui-input-inline">
    				<input type="text" name="invoice_title" autocomplete="off" class="layui-input">
    			</div>
    		</div>
            <div class="layui-inline">
                <label class="layui-form-label layui-bg-blue">是否修改</label>
                <div class="layui-input-inline search-radio-box">
                    <input type="radio" name="is_change" value="" title="全部" checked>
                    <input type="radio" name="is_change" value="2" title="未修改">
                    <input type="radio" name="is_change" value="1" title="已修改">
                </div>
            </div>
<div class="layui-inline">
    <label class="layui-form-label layui-bg-blue">是否发货</label>
    <div class="layui-input-inline search-radio-box">
        <input type="radio" name="gys_fh_state" value="" title="全部" checked>
        <input type="radio" name="gys_fh_state" value="2" title="未发货">
        <input type="radio" name="gys_fh_state" value="1" title="已发货">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="gys_fh_time_start_2" autocomplete="off" class="layui-input"
            placeholder="开始日期">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="gys_fh_time_end_2" autocomplete="off" class="layui-input" placeholder="结束日期">
    </div>
</div>
<div class="layui-inline">
    <label class="layui-form-label layui-bg-blue">是否收货</label>
    <div class="layui-input-inline search-radio-box">
        <input type="radio" name="gys_sh_state" value="" title="全部" checked>
        <input type="radio" name="gys_sh_state" value="2" title="未收货">
        <input type="radio" name="gys_sh_state" value="1" title="已收货">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="gys_sh_time_start_2" autocomplete="off" class="layui-input"
            placeholder="开始日期">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="gys_sh_time_end_2" autocomplete="off" class="layui-input" placeholder="结束日期">
    </div>
</div>
<div class="layui-inline">
    <label class="layui-form-label layui-bg-blue">入库</label>
    <div class="layui-input-inline search-radio-box">
        <input type="radio" name="ruku" value="" title="全部" checked>
        <input type="radio" name="ruku" value="2" title="未入">
        <input type="radio" name="ruku" value="1" title="已入">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="ruku_time_start_2" autocomplete="off" class="layui-input" placeholder="开始日期">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="ruku_time_end_2" autocomplete="off" class="layui-input" placeholder="结束日期">
    </div>
</div>
			<div class="layui-inline">
				<label class="layui-form-label layui-bg-blue">申请</label>
			        <div class="layui-input-inline search-radio-box">
			            <input type="radio" name="invoice_api_bianhao" value="" title="全部" checked>
			            <input type="radio" name="invoice_api_bianhao" value="1" title="已申请">
			            <input type="radio" name="invoice_api_bianhao" value="2" title="未申请">
			        </div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label layui-bg-blue">审核</label>
                    <div class="layui-input-inline search-radio-box">
                        <input type="radio" name="apply_state" value="" title="全部" checked>
                        <input type="radio" name="apply_state" value="2" title="等待审核">
                        <input type="radio" name="apply_state" value="3" title="审核通过">
                        <input type="radio" name="apply_state" value="4" title="驳回审核">
                    </div>
				<div class="layui-input-inline">
    				<input type="text" name="apply_time_start_2" autocomplete="off" class="layui-input"
    					placeholder="申请开始日期">
    			</div>
    			<div class="layui-input-inline">
    				<input type="text" name="apply_time_end_2" autocomplete="off" class="layui-input"
    					placeholder="申请结束日期">
    			</div>
    			<div class="layui-input-inline">
    				<input type="text" name="apply_shehe_time_start_2" autocomplete="off" class="layui-input"
    					placeholder="审核开始日期">
    			</div>
    			<div class="layui-input-inline">
    				<input type="text" name="apply_shehe_time_end_2" autocomplete="off" class="layui-input"
    					placeholder="审核结束日期">
    			</div>
			</div>
			
			<div class="layui-inline">
				<label class="layui-form-label layui-bg-blue">电子发票</label>
                    <div class="layui-input-inline search-radio-box">
                        <input type="radio" name="returncode" value="" title="全部" checked>
                        <input type="radio" name="returncode" value="1" title="未开票">
                        <input type="radio" name="returncode" value="2" title="已开票">
                        <input type="radio" name="returncode" value="5" title="开具失败">
                    </div>
				<div class="layui-input-inline">
    				<input type="text" name="invoice_time_start_2" autocomplete="off" class="layui-input"
    					placeholder="开始日期">
    			</div>
    			<div class="layui-input-inline">
    				<input type="text" name="invoice_time_end_2" autocomplete="off" class="layui-input"
    					placeholder="结束日期">
    			</div>
			</div>
		<div class="layui-inline">
            <label class="layui-form-label layui-bg-blue">保存发票</label>
            <div class="layui-input-inline search-radio-box">
                <input type="radio" name="is_down" value="" title="全部" checked>
                <input type="radio" name="is_down" value="2" title="未保存">
                <input type="radio" name="is_down" value="1" title="已保存">
            </div>
        </div>
    		<div class="layui-inline">
    			<label class="layui-form-label layui-bg-blue">推送军网</label>
    			<div class="layui-input-inline search-radio-box">
    				<input type="radio" name="invoice_state" value="" title="全部" checked>
    				<input type="radio" name="invoice_state" value="1" title="未推送">
    				<input type="radio" name="invoice_state" value="2" title="已推送">
    			</div>
    		</div>
			
    		
            <div class="layui-inline">
                <label class="layui-form-label layui-bg-blue">审核人</label>
                <div class="layui-input-inline">
                    <input type="text" name="invoice_beizhu" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-bg-blue">税号</label>
                <div class="layui-input-inline">
                    <input type="text" name="invoice_duty" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-bg-blue">发票备注</label>
                <div class="layui-input-inline">
                    <input type="text" name="invoice_beizhu" autocomplete="off" class="layui-input">
                </div>
            </div>
    		<div class="layui-inline">
    			<div class="layui-input-inline">
    				<button type="button" id="tuisong_search_btn"
    					class="layui-btn layui-btn-normal layui-btn-sm layui-bg-red">搜 索</button>
    			</div>
    		</div>
    	</form>
		
    </div>
	<div style="position: fixed; z-index: 999; left: 948px; top: 169px;">
	<button type="button" data-id="daoru_search" data-title="导入筛选"
		class="layui-btn layui-btn-normal layui-btn-sm daoru_search" lay-filter="daoru_search"><i
			class="layui-icon layui-icon-file-b"></i>导入筛选</button>
	<button type="button" data-id="daoru_edit" data-title="导入修改抬头"
		class="layui-btn layui-btn-normal layui-btn-sm daoru_edit"><i
			class="layui-icon layui-icon-survey"></i>导入修改抬头</button>
	</div>
	<table class="layui-hide" id="tuisong_list" lay-filter="tuisong_list"></table>
    <script>
    	var tuisong_list_url = "{:url('tuisong/ajaxList')}";
		var tuisong_cols = {$cols};
		var tuisong_goods_cols_invoice = {$goods_cols_invoice};
		var tuisong_goods_cols_invoice_old = {$goods_cols_invoice_old};
		var cart_detail_url = "{:url('tuisong/getCartList')}";
		var save_cart_info_url = "{:url('tuisong/saveCartInfo')}";
		var one_apply_info_url = "{:url('tuisong/oneApplyInfo')}";
		var send_e_invoice_uri = "{:url('invoiceapi/makeInvoice')}";
		var send_sd_invoice_uri = "{:url('invoiceapi/sdMakeInvoice')}";
		var send_sd_hongchong_uri = "{:url('invoiceapi/sdApplyHzInvoice')}";
		var send_sd_huoqu_uri = "{:url('invoiceapi/checkSdInvoice')}";
		var save_location_url = "{:url('tuisong/saveLocation')}";
		var push_jun_invoice_url = "{:url('invoice/pushJunInvoice')}";
		var save_invoice_field_url = "{:url('tuisong/saveInvoiceField')}";
		var content_url = "{:url('order/detail')}";
		var upload_uri = "{:url('Upload/uploadOne')}",
			excel_uri = "{:url('tuisong/excel')}",
			excel_title_uri = "{:url('tuisong/excelTitle')}";
    	$.getScript('/static/js/tuisong/index.js');
    </script>
	
	<script type="text/html" id="tuisongToolbar">
		<div class="layui-btn-container">
        <div class="layui-btn-group">
        <a type="button" class="layui-btn layui-btn-danger layui-btn-sm">审核</a>
			<a type="button" data-id="shenhe" data-title="电子审核通过" 
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="shenhe"><i
					class="layui-icon layui-icon-auz"></i>电子</a>
			<a type="button" data-id="shenhesd" data-title="数电审核通过"
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="shenhesd"><i
					class="layui-icon layui-icon-auz"></i>数电</a>
			</div>		
            <div class="layui-btn-group">
			<a type="button" data-id="bohui" data-title="驳回审核"
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="bohui"><i
					class="layui-icon layui-icon-refresh-3"></i>驳回审核</a>
                    </div>
			<div class="layui-btn-group">
				<a type="button" class="layui-btn layui-btn-danger layui-btn-sm">电子</a>
			<a type="button" data-id="shenqing" data-title="申请"
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="shenqing"><i
					class="layui-icon layui-icon-print"></i>申请</a>
			<a type="button" data-id="hongchong" data-title="红冲"
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="hongchong"><i
					class="layui-icon layui-icon-export"></i>红冲</a>
			</div>
			<div class="layui-btn-group">	
				<a type="button" class="layui-btn layui-btn-danger layui-btn-sm">数电</a>
			<a type="button" data-id="shenqingsd" data-title="申请"
				class="layui-btn layui-btn-warm layui-btn-sm layui-bg-green" lay-event="shenqingsd"><i
					class="layui-icon layui-icon-print"></i>申请</a>
			<a type="button" data-id="hongchongsd" data-title="红冲"
				class="layui-btn layui-btn-warm layui-btn-sm layui-bg-green" lay-event="hongchongsd"><i
					class="layui-icon layui-icon-export"></i>红冲</a>
			</div>	
			<div class="layui-btn-group">
			<a type="button" data-id="baocun" data-title="保存本地"
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="baocun"><i
					class="layui-icon layui-icon-download-circle"></i>保存本地</a>
			<a type="button" data-id="tuisong" data-title="推送军网"
				class="layui-btn layui-btn-normal layui-btn-sm" lay-event="tuisong"><i
					class="layui-icon layui-icon-release"></i>推送军网</a>
				</div>	

			
			
		</div>
	</script>
	
	
	<script type="text/html" id="tuisong_tool">
		<div class="layui-btn-group">
			<a class="view-more layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="viewMore" data-title="查看产品"><i class="layui-icon layui-icon-rate-solid"></i></a>
			<a class="views layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="views" data-title="查看订单"><i class="layui-icon layui-icon-cart"></i></a>
		{{# if(d.s_invoice_proof){ }}
			<a class="view-more layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="viewFp" target="_blank" data-title="查看发票"><i class="layui-icon layui-icon-read"></i></a>
		{{# } }}
		{{# if(d.s_invoice_api_bianhao){ }}
		<a class="layui-btn layui-btn-sm layui-btn" type="button" lay-event="huoqusd" data-title="获取数电">获取</a>
		{{# } }}
		{{# if(d.apply_state == 2){}}
			{{# if(!d.s_invoice_api_bianhao){ }}
			<a class="layui-btn layui-btn-sm layui-btn-danger" type="button" lay-event="shenhe" data-title="审电">审电</a>
			<a class="layui-btn layui-btn-sm layui-bg-green" type="button" lay-event="shenhesd" data-title="审数">审数</a>
			<a class="layui-btn layui-btn-danger layui-btn-sm" type="button" lay-event="bohui" data-title="驳回审核"><i class="layui-icon layui-icon-close"></i></a>
			{{# } }}
		{{# } else if(d.apply_state == 3 && d.returncode !== '成功'){ }}
			<a class="layui-btn layui-btn-danger layui-btn-sm" type="button" lay-event="shenqing" data-title="电子发票">电</a>
			<a class="layui-btn layui-btn-sm layui-bg-green" type="button" lay-event="shenqingsd" data-title="数电发票">数</a>
		{{# } else if(d.is_down == 2){ }}
			<a class="layui-btn layui-btn-black layui-btn-sm" type="button" lay-event="baocun" data-title="保存本地"><i class="layui-icon layui-icon-download-circle"></i></a>
		{{# } else if(d.invoice_state == 1){ }}
			<a class="layui-btn layui-btn-sm" type="button" lay-event="tuisong" data-title="推送军网"><i class="layui-icon layui-icon-release"></i></a>
		{{# }}}
		{{# if(d.returncode == '成功'){ }}
			<a class="layui-btn layui-btn-danger layui-btn-sm" type="button" lay-event="hongchong" data-title="电子红冲"><i class="layui-icon layui-icon-export"></i></a>
			<a class="layui-btn layui-btn-danger layui-btn-sm layui-bg-green" type="button" lay-event="hongchongsd" data-title="数电红冲"><i class="layui-icon layui-icon-export"></i></a>
		{{# }}}	
		</div>
	</script>
	<script type="text/html" id="is_changeTpl">
	{{# if(d.is_change == 1){}}
		<div class="layui-anim circle layui-bg-red" data-title="已修改">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
		{{# } else {}}
			<div class="layui-anim circle layui-bg-green" data-title="未修改">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
			{{# }}}
	</script>
	<script type="text/html" id="order_moneyTpl">
	{{# 
		return d.order_money/100;
	}}
	</script>
	 <script type="text/html" id="gys_sh_stateTpl">
    {{# if(d.gys_sh_state == 1){}}
    	<div class="layui-anim circle layui-bg-green" data-title="已收货">
    		<i class="layui-icon layui-icon-radio"></i>
    	</div>
    	{{# } else {}}
    		<div class="layui-anim circle layui-bg-red" data-title="未收货">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    		{{# }}}
    </script>
    <script type="text/html" id="s_invoice_typeTpl">
    {{# if(d.s_invoice_type == 1){}}
        普通发票
        {{# } else {}}
           详细发票
            {{# }}}
    </script>
     <script type="text/html" id="apply_stateTpl2">
    {{# if(d.apply_state === 1){}}
    	<div class="layui-anim circle layui-bg-red" data-title="未申请">
    		<i class="layui-icon layui-icon-radio"></i>
    	</div>
    	{{# } else if(d.apply_state === 2){ }}
    		<div class="layui-anim circle layui-bg-black" data-title="等待审核">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    	{{# } else if(d.apply_state === 3){ }}
    		<div class="layui-anim circle layui-bg-green" data-title="审核通过">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
		{{# } else if(d.apply_state === 4){ }}
			<div class="layui-anim circle layui-btn-warm" data-title="驳回">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
    	{{# } else {}}
    		<div class="layui-anim circle layui-bg-red" data-title="未申请">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    		{{# }}}
    </script>
    <script type="text/html" id="rukuTpl">
    {{# if(d.ruku == 1){}}
        <div class="layui-anim circle layui-bg-green" data-title="已入库">
            <i class="layui-icon layui-icon-radio"></i>
        </div>
        {{# } else {}}
            <div class="layui-anim circle layui-bg-red" data-title="未入库">
                <i class="layui-icon layui-icon-radio"></i>
            </div>
        {{# }}}
    </script>
    <script type="text/html" id="s_api_typeTpl">
    {{# if(d.s_api_type == '82'){}}
        <div class="layui-anim circle layui-bg-green" data-title="数电">
            <i class="layui-icon layui-icon-radio"></i>
        </div>
        {{# } else if(d.s_api_type == '026'){ }}
            <div class="layui-anim circle layui-bg-red" data-title="电票">
                <i class="layui-icon layui-icon-radio"></i>
            </div>
        {{# } else {}}
            <div class="layui-anim circle layui-bg-black" data-title="无">
                <i class="layui-icon layui-icon-radio"></i>
            </div>
            {{# }}}
    </script>
	<script type="text/html" id="returncode2Tpl">
    {{# if(d.returncode === null){}}
    	<div class="layui-anim circle layui-bg-red" data-title="未申请">
    		<i class="layui-icon layui-icon-radio"></i>
    	</div>
    	{{# } else if(d.returncode == '成功'){ }}
    		<div class="layui-anim circle layui-bg-green" data-title="开具成功">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    	{{# } else if(d.returncode == '线下开具成功'){ }}
    		<div class="layui-anim circle layui-bg-blue" data-title="线下开具">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    	{{# } else {}}
    		<div class="layui-anim circle layui-bg-black" data-title="开具失败：{{d.returncode?d.returncode:'无'}}">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    		{{# }}}
    </script>
    <script type="text/html" id="invoice_stateTpl">
    {{# if(d.invoice_state == 2){}}
    	<div class="layui-anim circle layui-bg-green" data-title="已推送">
    		<i class="layui-icon layui-icon-radio"></i>
    	</div>
    	{{# } else {}}
    		<div class="layui-anim circle layui-bg-red" data-title="未推送">
    			<i class="layui-icon layui-icon-radio"></i>
    		</div>
    		{{# }}}
    </script>
	<script type="text/html" id="s_invoice_api_bianhaoTpl">
	{{# if(d.s_invoice_api_bianhao){}}
		<div class="layui-anim circle layui-bg-green" data-title="已申请">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
		{{# } else {}}
			<div class="layui-anim circle layui-bg-red" data-title="未申请">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
			{{# }}}
	</script>
    <script type="text/html" id="is_downTpl">
	{{# if(d.is_down == 2){}}
		<div class="layui-anim circle layui-bg-red" data-title="未保存">
			<i class="layui-icon layui-icon-radio"></i>
		</div>
		{{# } else {}}
			<div class="layui-anim circle layui-bg-green" data-title="已保存">
				<i class="layui-icon layui-icon-radio"></i>
			</div>
			{{# }}}
	</script>
<script type="text/html" id="order_typeTpl">
{{# if(d.order_type == 1){}}
    自然订单
    {{# } else if(d.order_type == 2){ }}
        报备单
        {{# } else if(d.order_type == 3){ }}
            其他订单
            {{# } else if(d.order_type == 4){ }}
                改库房
                {{# } else if(d.order_type == 5){ }}
                    退货
                    {{# } else if(d.order_type == 6){ }}
                        竞价单
                        {{# } else if(d.order_type == 7){ }}
                        废止订单
                        {{# } else if(d.order_type == 8){ }}
                        前报备
                        {{# } else if(d.order_type == 9){ }}
                        后报备
                        {{# }}}
</script>
	<style>
		td .layui-table-header{
			height: auto;
		}
        .layui-table-view .layui-table{width: 100%}
		.layui-table-cell{text-align: center;}
		.layui-btn-sm{padding: 0 5px;}
	</style>
